package com.cssl.controller;

import com.cssl.domain.dto.UserAccountDto;
import com.cssl.domain.dto.UserAccountTraceDto;
import com.cssl.openFeign.DtsAccountTraceClient;
import com.cssl.util.InfoCode;
import com.cssl.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/usersaccounttrace")
public class DtsAccountTraceController {

    @Autowired
    private DtsAccountTraceClient client;

    @PostMapping("/List")
    public Result getAccountTraceList(@RequestBody UserAccountDto userAccountDto) {
        return client.getAccountTraceList(userAccountDto);

    }

    @PostMapping("/approve")
    public Result approveAccountTrace(@RequestBody UserAccountTraceDto traceDto) {
        System.out.println("app80:"+traceDto);
        return client.approveAccountTrace(traceDto);
    }
}
